<!DOCTYPE html>
<html lang="zh-CN" class="h-100">
  <head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <!--强制使用webkit 内核，对360，QQ等国产双核浏览器生效-->
    <meta name="renderer" content="webkit" />
    <!--强制使用webkit 内核，双核浏览器生效-->
    <meta name="force-rendering" content="webkit" />
    <meta
      name="viewport"
      content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, viewport-fit=cover"
    />
    <!--禁止当前页面进行缓存，解决更新后的缓存问题-->
    <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
    <meta http-equiv="Pragma" content="no-cache" />
    <meta http-equiv="Expires" content="-1" />
    <meta name="format-detection" content="telephone=no,email=no" />

    <link rel="icon" href="<%= BASE_URL %>favicon.ico" />
    <!-- DNS 预解析 -->
    <link rel="dns-prefetch" href="https://cdn.staticfile.org" />
    <link rel="dns-prefetch" href="https://at.alicdn.com" />
    <link rel="dns-prefetch" href="https://lf3-cdn-tos.bytecdntp.com" />

    <title><%= process.env.VUE_APP_COMPANY %></title>

    <% if (["production", "prod"].includes(process.env.NODE_ENV)) { %>
    <!-- 禁止发布的版本进行右击动作; -->
    <script type="text/javascript">
      document.addEventListener("contextmenu", evt => {
        evt.stopImmediatePropagation();
        evt.stopPropagation(); //阻止事件冒泡
        evt.preventDefault(); //阻止默认行为
        evt.returnValue = false;
        return false;
      });
      // 屏蔽部分功能按键
      var excludeNode = ["INPUT", "TEXTAREA", "SELECT"];
      window.addEventListener("keydown", async e => {
        // 当用户通过F12操作时。或者是ctrl+shift+i 时，不做任何处理，防止打开调试窗口
        // 当用户使用 Shift+F10 打开邮件菜单时的屏蔽
        // 当用户使用 ctrl + s 进行保存动作的时候的屏蔽
        // 当用户使用 ctrl + a 进行全选时候，除了表单以外的全选屏蔽
        if (
          e.keyCode === 123 ||
          (e.ctrlKey && e.shiftKey && e.keyCode === 73) ||
          (e.shiftKey && e.keyCode == 121) ||
          (e.ctrlKey && e.keyCode === 83) ||
          (e.ctrlKey && e.keyCode === 65 && !excludeNode.includes(e.target.nodeName))
        ) {
          e.preventDefault(); // 阻止系统默认刷新动作。
          e.cancelBubble = true;
          e.returnValue = false;
          return false;
        }
      });
    </script>
    <!-- 统计代码 -->
    <% } %>
    <!-- 如果当前使用的是IE 浏览器的话，就给出提示，要求是应用webkit内核浏览器，跳转到chrome升级页面 -->
    <script>
      /*@cc_on window.location.href="http://support.dmeng.net/upgrade-your-browser.html?referrer="+encodeURIComponent(window.location.href); @*/
    </script>

    <!-- <script rel="stylesheet" crossorigin="anonymous" src="https://lf9-cdn-tos.bytecdntp.com/cdn/expire-1-M/vConsole/3.12.1/vconsole.min.js"></script>
    <script>
      new VConsole();
    </script> -->
    <!-- 引入样式 -->
    <script rel="stylesheet" crossorigin="anonymous" src="https://at.alicdn.com/t/c/font_3905445_5ju0sp6bad5.js" async defer></script>
    <link rel="stylesheet" crossorigin="anonymous" href="https://at.alicdn.com/t/c/font_3295273_agg1r9reoq.css" />
    <link rel="stylesheet" crossorigin="anonymous" href="https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-y/normalize/8.0.1/normalize.min.css" />
    <link rel="stylesheet" crossorigin="anonymous" href="https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-y/animate.css/4.1.1/animate.min.css" />
    <link id="theme" rel="stylesheet" href="<%= BASE_URL %>theme/default.css?v=<%= htmlWebpackPlugin.options.version %>" />

    <link rel="stylesheet" crossorigin="anonymous" href="<%= BASE_URL %>css/launcher.css" />
    <script>
      // 判断页面是否加载超时
      setTimeout(function () {
        if (!document.body.classList.contains("loaded")) {
          document.querySelector("#loader-wrapper").classList.add("timeout");
          document.querySelector("#loader-wrapper .load_timeout").addEventListener("click", () => {
            window.stop();
            const diffTime = new Date(2023, 1, 1);
            var cacheId = parseInt(((new Date().getTime() - diffTime.getTime()) / 1000).toFixed(0)).toString(36);
            var newUrl = new URL(location.href);
            newUrl.searchParams.delete("ts");
            newUrl.searchParams.append("ts", cacheId);
            location.href = newUrl.href;
          });
        }
      }, (Math.random() * 3000 + 7000) >> 0);
    </script>
  </head>
  <body class="h-100 user-select-none">
    <noscript>
      <strong>
        We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.
      </strong>
    </noscript>
    <div id="loader-wrapper">
      <div class="loader-section section-left"></div>
      <div class="loader-section section-right"></div>
      <div id="loader"></div>
      <div class="load_title">
        <div class="load_message">正在加载，请耐心等待</div>
        <div class="load_timeout">没有加载出来？点我刷新重新</div>
        <span class="application-version">V&nbsp;<%= htmlWebpackPlugin.options.version %></span>
      </div>
    </div>
    <div id="app"></div>
    <!-- built files will be auto injected -->
    <!-- 引入组件库 -->
    <% if (["production", "prod"].includes(process.env.NODE_ENV)) {%>
    <script crossorigin="anonymous" src="https://cdn.staticfile.org/vue/2.7.14/vue.min.js"></script>
    <% } else { %>
    <script crossorigin="anonymous" src="https://cdn.staticfile.org/vue/2.7.14/vue.js"></script>
    <script>
      Vue.config.productionTip = false;
      Vue.config.devtools = true;
      Vue.config.silent = true;
    </script>

    <% } %>
    <script
      crossorigin="anonymous"
      src="https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-y/lodash.js/4.17.21/lodash.min.js"
      type="application/javascript"
    ></script>
  </body>
</html>
